home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIDocShellTreeNode.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  103 lines

  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is the Mozilla browser.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications, Inc.
  20.  * Portions created by the Initial Developer are Copyright (C) 1999
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Travis Bogard <travis@netscape.com>
  25.  *   Steve Clark <buster@netscape.com>
  26.  *
  27.  * Alternatively, the contents of this file may be used under the terms of
  28.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  29.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30.  * in which case the provisions of the GPL or the LGPL are applicable instead
  31.  * of those above. If you wish to allow use of your version of this file only
  32.  * under the terms of either the GPL or the LGPL, and not to allow others to
  33.  * use your version of this file under the terms of the MPL, indicate your
  34.  * decision by deleting the provisions above and replace them with the notice
  35.  * and other provisions required by the GPL or the LGPL. If you do not delete
  36.  * the provisions above, a recipient may use your version of this file under
  37.  * the terms of any one of the MPL, the GPL or the LGPL.
  38.  *
  39.  * ***** END LICENSE BLOCK ***** */
  40.  
  41. #include "nsISupports.idl"
  42. #include "nsIDocShellTreeItem.idl"
  43.  
  44. /**
  45.  * The nsIDocShellTreeNode supplies the methods for interacting with children
  46.  * of a docshell.  These are essentially the methods that turn a single docshell
  47.  * into a docshell tree. 
  48.  */
  49.  
  50. // XXXbz this interface should probably inherit from nsIDocShellTreeItem, and
  51. // some methods should move from there to here...
  52.  
  53. [scriptable, uuid(37f1ab73-f224-44b1-82f0-d2834ab1cec0)]
  54. interface nsIDocShellTreeNode : nsISupports
  55. {
  56.     /*
  57.     The current number of DocShells which are immediate children of the 
  58.     this object.
  59.     */
  60.     readonly attribute long childCount;
  61.  
  62.     /*
  63.     Add a new child DocShellTreeItem.  Adds to the end of the list.
  64.     Note that this does NOT take a reference to the child.  The child stays
  65.     alive only as long as it's referenced from outside the docshell tree.
  66.     @throws NS_ERROR_ILLEGAL_VALUE if child corresponds to the same
  67.             object as this treenode or an ancestor of this treenode.
  68.     // XXXbz this should take an nsIDocShellTreeNode, I think.
  69.     */
  70.     void addChild(in nsIDocShellTreeItem child);
  71.  
  72.     /*
  73.     Removes a child DocShellTreeItem.
  74.     // XXXbz this should take an nsIDocShellTreeNode, I think.
  75.     */
  76.     void removeChild(in nsIDocShellTreeItem child);
  77.  
  78.     /* Return the child at the index requested.  This is 0-based.*/
  79.     nsIDocShellTreeItem getChildAt(in long index);
  80.  
  81.     /*
  82.     Return the child DocShellTreeItem with the specified name.
  83.     aName - This is the name of the item that is trying to be found.
  84.     aRecurse - Is used to tell the function to recurse through children.
  85.         Note, recursion will only happen through items of the same type.
  86.     aSameType - If this is set only children of the same type will be returned.
  87.     aRequestor - This is the docshellTreeItem that is requesting the find.  This
  88.         parameter is used when recursion is being used to avoid searching the same
  89.         tree again when a child has asked a parent to search for children.
  90.     aOriginalRequestor - The original treeitem that made the request, if any.
  91.         This is used to ensure that we don't run into cross-site issues.
  92.  
  93.     Note the search is depth first when recursing.
  94.     // XXXbz this should return an nsIDocShellTreeNode, I think.
  95.     */
  96.     nsIDocShellTreeItem findChildWithName(in wstring aName,
  97.                                           in boolean aRecurse,
  98.                                           in boolean aSameType,
  99.                                           in nsIDocShellTreeItem aRequestor,
  100.                                           in nsIDocShellTreeItem aOriginalRequestor);
  101. };
  102.  
  103.